<?php $photos = Doctrine::getTable('Image')->fetchall(array('albumId'=>(isset($albumId) ? $albumId : 0), 'keyword'=>(isset($keyword) ? $keyword : '')))?>

<ul class="photos">
  <?php foreach ($photos as $photo):?>
    <li>
      <?php echo image_tag('/uploads/gallery/'.$photo->getFullPath(), array('alt'=>$photo, 'longdesc'=>$photo))?>
    </li>
  <?php endforeach?>
</ul>